﻿using System.Windows;
using Bookvar.ApplicationModel;
using Bookvar.ServiceModel;

namespace Bookvar.UI.DragDrop.Actions
{
    public abstract class DropActionBase
    {
        public abstract void Execute( DragEventArgs args, MindMapPanel panel, Point dropPoint );

        protected static IActionService ActionService
        {
            get
            {
                string mapKey =
                    BookvarApplication.Current.ServiceLayer.GetService<IMindmapService>().CurrentMindmap.Key.ToString();
                return BookvarApplication.Current.ServiceLayer.GetService<IActionService>( mapKey );
            }
        }
    }
}